Skip to content

release: 0.51.0#101

Open
stainless-app[bot] wants to merge 23 commits intomainfrom
release-please--branches--main--changes--next--components--sdk
Open

release: 0.51.0#101
stainless-app[bot] wants to merge 23 commits intomainfrom
release-please--branches--main--changes--next--components--sdk

Conversation

@stainless-app
Copy link
Copy Markdown
Contributor

@stainless-app stainless-app Bot commented Apr 23, 2026

Automated Release PR

0.51.0 (2026-04-24)

Full Changelog: v0.50.0...v0.51.0

Features

  • add browser-scoped session client (94228be)
  • Expose browser_session_id on managed auth connection (410b647)
  • generate browser-scoped session bindings (e730af8)
  • restore node browser fetch helper (b09434e)

Bug Fixes

  • clean up node browser routing lint drift (7a56ab6)
  • drop node browser routing branch churn (2f16386)
  • enforce browser base_url routing (d835f69)
  • evict deleted browser routes (2d0056e)
  • handle browser pool route cache updates (81e47ca)
  • keep browser routing helpers out of generated code (a76f7ae)
  • limit browser route cache sniffing (0e0e88f)
  • preserve browser routing fetch options (9b24280)
  • require base_url for browser-scoped routing (ae9a739)
  • restore generated types formatting (a7ff9bc)
  • simplify node browser routing helpers (fdd3adf)

Chores

  • internal: more robust bootstrap script (4ba0696)

Documentation

  • restore raw http example in browser routing demo (0d9ddce)

Refactors

  • move node browser routing rollout to env (00c91ef)
  • rename browser routing subresources config (7030d96)
  • replace browser-scoped client with browser routing cache (2f12277)
  • simplify browser routing cache (2082705)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Note

Medium Risk
Introduces a new browser subresource routing layer that rewrites certain /browsers/{id}/... requests to the browser VM base_url using cached JWTs, which could impact request behavior/auth headers and routing in production. Changes are well-covered by new unit tests but touch the core client fetch path.

Overview
Bumps the SDK version to 0.51.0 (manifest/package/version/changelog) and updates the tracked OpenAPI spec metadata.

Adds browser-scoped routing via a shared BrowserRouteCache wired into the client’s fetch, which auto-populates from browser create/list and pool acquire responses, conditionally reroutes allowlisted /browsers/{sessionId}/{subresource} calls to the browser VM base_url with jwt, and evicts cache entries on successful browser delete or pool release (configurable via KERNEL_BROWSER_ROUTING_SUBRESOURCES).

Introduces a new browsers.fetch() helper (browserFetch) that issues raw HTTP via the browser VM network stack (/curl/raw) using the cached route, exports the new routing/fetch types from src/index.ts, adds an example, and adds comprehensive tests for routing, cache behavior, and option preservation; also slightly hardens scripts/bootstrap handling of SKIP_BREW.

Reviewed by Cursor Bugbot for commit 2b2e3ca. Bugbot is set up for automated code reviews on this repo. Configure here.

rgarcia and others added 13 commits April 21, 2026 13:09
Bind browser subresource calls to a browser session's base_url and expose raw HTTP through fetch so metro-routed access feels like normal JavaScript networking.

Made-with: Cursor
Fail fast when browser-scoped clients do not have a session base_url, route subresource calls through the browser session base directly, and clean up browser-vm wording.

Made-with: Cursor
Fail fast when browser-scoped clients are missing a browser session base_url, route subresource calls through the session base consistently, and keep lint output clean.

Made-with: Cursor
Replace the handwritten Node browser-scoped façade with deterministic generated bindings from the browser resource graph, and enforce regeneration during lint and build.

Made-with: Cursor
Route direct-to-VM browser requests through the shared client cache so the SDK no longer needs the generated browser session wrapper layer.

Made-with: Cursor
Trim the node browser routing changes down to the cache/interceptor shape from PR #100 and remove the leftover browser-scoped example and priming surface.

Made-with: Cursor
Shorten the browserRouting allowlist field to subresources so the direct-to-VM configuration reads more cleanly without changing behavior.

Made-with: Cursor
Keep the node browser-routing example showing both direct subresource routing and the cache-backed /curl/raw path.

Made-with: Cursor
Bring back the cache-backed browser fetch helper so raw HTTP stays on the SDK's language-native surface instead of falling through to manual /curl/raw requests.

Made-with: Cursor
Remove the unnecessary generated resource and dependency diffs from the node branch and keep BrowserRouteCache.set() as a direct assignment without trimming user input.

Made-with: Cursor
Tighten the browser routing files to the repo's formatter expectations so the node CI lint job passes cleanly again.

Made-with: Cursor
Split browser.fetch into its own helper, remove unused browser transport code, and simplify withOptions cache sharing so the routing layer stays easier to reason about.

Made-with: Cursor
@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

Reason: This is an automated release PR with only internal chores; it does not modify API endpoints (packages/api/cmd/api/) or Temporal workflows (packages/api/lib/temporal).

To monitor this PR anyway, reply with @firetiger monitor this.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app Bot commented Apr 23, 2026

🧪 Testing

To try out this version of the SDK:

npm install 'https://pkg.stainless.com/s/kernel-typescript/e36b009c8f2fe25ff850467b851be8e4402c4f86/dist.tar.gz'

Expires at: Sun, 24 May 2026 21:15:41 GMT
Updated at: Fri, 24 Apr 2026 21:15:41 GMT

rgarcia and others added 3 commits April 24, 2026 11:08
Remove the public browser routing constructor knobs and read direct-to-VM subresource rollout from KERNEL_BROWSER_ROUTING_SUBRESOURCES instead, defaulting to curl while leaving browser.fetch cache-backed.
Keep the routing wrapper from stripping runtime-specific fetch init options when requests fall through or route directly to the VM, and share the browser fetch helpers so routed methods stay type-safe and covered by regression tests.

Made-with: Cursor
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from e66387d to b96b5e6 Compare April 24, 2026 17:57
@stainless-app stainless-app Bot changed the title release: 0.50.1 release: 0.51.0 Apr 24, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from b96b5e6 to db820d1 Compare April 24, 2026 17:57
rgarcia and others added 7 commits April 24, 2026 15:18
Only parse cloned JSON responses for browser metadata endpoints so unrelated API calls don't pay the route cache warm-up cost, and cover the regression with a focused routing fetch test.

Made-with: Cursor
Drop cached browser routing entries after successful DELETE /browsers/:id responses so stale base URLs are not reused, and cover both the success and failure paths in the routing tests.

Made-with: Cursor
Restore the generated internal types file so browser routing changes stay in custom code only.
Move joinURL into lib and keep browser.fetch limited to the SDK's existing HTTPMethod union.

Made-with: Cursor
Restore src/internal/types.ts byte-for-byte to the generated base version.
This drops the file from the PR so browser routing changes stay out of generated code.

Made-with: Cursor
Warm the browser route cache from browser pool acquire responses and evict released sessions after successful pool releases.
Keep this behavior in the routing middleware so generated resource methods stay untouched.

Made-with: Cursor
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--sdk branch from db820d1 to 2b2e3ca Compare April 24, 2026 21:14
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2b2e3ca. Configure here.

const apiOrigin = new URL(apiBaseURL).origin;

return async (input, init) => {
const request = new Request(input, init);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Routing fetch locks ReadableStream bodies before forwarding

Medium Severity

createRoutingFetch eagerly constructs new Request(input, init) on every call, which locks any ReadableStream body from init. For non-routed requests (most API calls), the original init with its now-locked body stream is then passed to innerFetch, causing a TypeError. For routed requests, requestBodyForFetch prefers originalInit.body (the locked stream) over request.body, producing the same failure. Any SDK method whose body passes through buildBody as a ReadableStream or async iterator will break.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2b2e3ca. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant